import Vue from "vue";
import App from "./App.vue";
import router from "./router";

//引入图标
import { Icon } from "vant";
import { Tabbar, TabbarItem } from "vant";
import { Swipe, SwipeItem } from "vant";
import { Lazyload } from "vant";
import { Grid, GridItem } from "vant";
import { Image as VanImage } from "vant";
import { NavBar } from "vant";
import { Tab, Tabs } from "vant";
import { Empty } from "vant";
import { Stepper } from "vant";
import { PullRefresh } from "vant";
import { List } from "vant";
import { Switch } from "vant";
import { Toast } from "vant";

Vue.use(Toast);

Vue.use(Switch);

Vue.use(List);

Vue.use(PullRefresh);

Vue.use(Stepper);

Vue.use(Empty);

Vue.use(Tab);
Vue.use(Tabs);

Vue.use(NavBar);

Vue.use(VanImage);

Vue.use(Grid);
Vue.use(GridItem);

Vue.use(Lazyload);

Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Tabbar);
Vue.use(TabbarItem);

Vue.use(Icon);

Vue.filter("filters", (val) => {
  if (val) {
    return val.replace("T", "-").replace(".000Z", "");
  }
});

Vue.config.productionTip = false;

new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
